package com.itheima.controller.cms;


import com.itheima.core.R;

import com.itheima.pojo.cms.CmsPrefrenceArea;
import com.itheima.service.cms.CmsPrefrenceAreaService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/prefrenceArea")
public class CmsPrefrenceAreaController {


    @DubboReference
    private CmsPrefrenceAreaService cmsPrefrenceAreaService;
    /*获取所有商品优选 /listAll */
    @GetMapping("/listAll")
    public R listAll(){

        List<CmsPrefrenceArea> cmsPrefrenceAreas =cmsPrefrenceAreaService.listAll();
        return R.success("",cmsPrefrenceAreas);
    }
}
